package module.building.consts
{
	public class BuildConst
	{
		public function BuildConst()
		{
		}
		
		public static const ALLTYPE_ARRAY:Array = [
			[SUBTYPE_EQUIP,SUBTYPE_SORLIDER,SUBTYPE_FARM],
			[SUBTYPE_SHOP,SUBTYPE_COMMERCE],
			[SUBTYPE_TAVERN,SUBTYPE_TREASURE,SUBTYPE_TECHNOLOGY,SUBTYPE_RODE,SUBTYPE_BUFF],
			[],
			[SUBTYPE_AFFOREST,SUBTYPE_HUMANITY,SUBTYPE_SERVICE],
			[SUBTYPE_CASTLE,SUBTYPE_SQUARE],
			[SUBTYPE_WALL,SUBTYPE_TOWER,SUBTYPE_GATE]
		];
		
		public static const SUBTYPENAME_ARRAY:Array = [
			["装备","士兵","农田"],
			["店铺","商会"],
			["酒馆","宝物","科技","道路","Buff"],
			[],
			["绿化","人文","服务"],
			["城堡","广场"],
			["城墙","箭塔","城门"]
		];
		
		public static const TIPS_ITEM_ARRAY:Array = [
			[],
			[],
			[],
		];
		
		public static function getSubType(type:int):Array
		{
			return ALLTYPE_ARRAY[type] as Array;
		}
		
		public static function getSubTypeName(subType:String):String
		{
			if(subType.length == 1){return "所有分类";}
			var x:int=parseInt(subType.charAt(0));
			var y:int=parseInt(subType.charAt(2));
			return SUBTYPENAME_ARRAY[x][y] as String;
		}
		
		public static function getItemsByType(type:int):Array
		{
			return TIPS_ITEM_ARRAY[type] as Array;
		}
		
		///////////////////////////////////
		///////////建筑状态常量/////////
		/**
		 *	地基状态 
		 */		
		public static const STATUS_FOUNDATION:int = 1;
		/**
		 *	闲置 
		 */		
		public static const STATUS_IDLE:int = 2;
		/**
		 * 	生产
		 */		
		public static const STATUS_PRODUCTING:int = 3;
		/**
		 *	可收获 
		 */		
		public static const STATUS_HARVEST:int = 4;
		/**
		 *	损伤 
		 */		
		public static const STATUS_INJURY:int = 5;
		/**
		 *	 废墟
		 */		
		public static const STATUS_RUINS:int = 6;
		
		///////////////////////////////////
		//////////建筑类型常量///////////
		/**
		 * 装备 
		 */		
		public static const SUBTYPE_EQUIP:String = "0_0";
		/**
		 * 士兵 
		 */		
		public static const SUBTYPE_SORLIDER:String = "0_1";
		/**
		 * 农田 
		 */		
		public static const SUBTYPE_FARM:String = "0_2";
		/**
		 * 店铺 
		 */		
		public static const SUBTYPE_SHOP:String = "1_0";
		/**
		 *  商会
		 */		
		public static const SUBTYPE_COMMERCE:String = "1_1";
		/**
		 *  酒馆
		 */		
		public static const SUBTYPE_TAVERN:String = "2_0";
		/**
		 * 宝物 
		 */		
		public static const SUBTYPE_TREASURE:String = "2_1";
		/**
		 * 科技 
		 */		
		public static const SUBTYPE_TECHNOLOGY:String = "2_2";
		/**
		 * 道路
		 */		
		public static const SUBTYPE_RODE:String = "2_3";
		/**
		 * buff
		 */		
		public static const SUBTYPE_BUFF:String = "2_4";
		/**
		 * 绿化
		 */		
		public static const SUBTYPE_AFFOREST:String = "4_0";
		/**
		 * 人文 
		 */		
		public static const SUBTYPE_HUMANITY:String = "4_1";
		/**
		 *服务 
		 */		
		public static const SUBTYPE_SERVICE:String = "4_2";
		/**
		 * 城堡 
		 */		
		public static const SUBTYPE_CASTLE:String = "5_0";
		/**
		 * 广场 
		 */		
		public static const SUBTYPE_SQUARE:String = "5_1";
		/**
		 * 城墙 
		 */		
		public static const SUBTYPE_WALL:String = "6_0";
		/**
		 * 箭塔 
		 */		
		public static const SUBTYPE_TOWER:String = "6_1";
		/**
		 * 城门 
		 */		
		public static const SUBTYPE_GATE:String = "6_2";
		
		
		///////////////////////////////////
		//////////建筑功能常量///////////
		/**
		 * 维修 
		 */		
		public static const BUILD_REPAIR:int = 0;
		/**
		 * 建筑升级 
		 */		
		public static const BUILD_UPDATA:int = 1;
		/**
		 * 招募裸兵 
		 */		
		public static const BUILD_RECRIUT:int = 2;
		/**
		 * 编辑部队 
		 */			
		public static const BUILD_EDIT:int = 3;
		/**
		 * 弓兵装备生产 
		 */		
		public static const BUILD_ARCHER_EQUIP:int = 4;
		/**
		 * 步兵装备生产 
		 */		
		public static const BUILD_INFANTRY_EQUIP:int = 5;
		/**
		 * 骑兵装备生产
		 */		 
		public static const BUILD_CAVALRY_EQUIP:int = 6;
		/**
		 * 招募骑士
		 */		
		public static const BUILD_KNIGHT_RECRIUT:int = 7;
		/**
		 * 骑士管理 
		 */		
		public static const BUILD_KNIGHT_MANAGE:int = 8;
		/**
		 * 种植 
		 */		
		public static const BUILD_FARM:int = 9;
		/**
		 * 城门 
		 */		
		public static const BUILD_GATE:int = 10;
		/**
		 *裸兵收获 
		 */		
		public static const BUILD_NAKED_SOLDIERS_HARVEST:int = 11;
		/**
		 *弓箭兵装备即时收获 
		 */		
		public static const BUILD_ARCHER_IMMEDIATELY_HARVEST_EQUIPMENT:int = 12;
		/**
		 *步兵装备即时收获 
		 */		
		public static const BUILD_INFANTRY_IMMEDIATELY_HARVEST_EQUIPMENT:int = 13;
		/**
		 *骑兵装备即时收获 
		 */		
		public static const BUILD_CAVALRY_IMMEDIATELY_HARVEST_EQUIPMENT:int = 14;
	}
}